function checkRoot(menuId){
	var result;
	$.ajax({
		url:"/security/Login2/getAnniu.do",
		async:false,
		data:{
			menu_id:menuId
		},
		dataType:"text",
		success:function(data){
			result = eval('(' + data + ')');
			if(result.code=="1"){
				hideDisableBtn(result.data);
				
			}else if(result.code=="0"){
				window.top.location = "/security/errorpage/403.html";
				
			}else{
				window.top.location= "/security/errorpage/403.html";
			}
		}
	})
	return result;
}
function hideDisableBtn(btnRootList){	
	for(var i=0;i<btnRootList.length;i++){
		if(btnRootList[i].value=="1"){
			$(".wa-"+btnRootList[i].name).each(function(){
				$(this).css("display","inline-block")
			})
		}
	}
}

function GetUrlString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)","i");
     var r = window.location.search.substr(1).match(reg);//search,查询？后面的参数，并匹配正则
	     if(r!=null)
	    	 return  unescape(r[2]); 
	     return null;
}

var WinAlerts = window.alert;
window.alert = function (e) {
if (e != null && e.indexOf("试用到期")>-1) {
//和谐了
}else {
WinAlerts (e);
}
};